const express = require('express')
const { createProxyMiddleware } = require('http-proxy-middleware')

const app = express()
app.use(express.static('dist'))
app.use('/api', createProxyMiddleware({
    target: "https://api.iynn.cn/film/api/v1",
    changeOrigin: true,
    pathRewrite: {
        "^/api": "",
    }
}))
app.listen(12399);
